﻿@model IEnumerable<Cafeteria.Models.Administracion.Usuario.UsuarioxSucursalBean>

@{
    ViewBag.Title = "Asignar Personal Sucursal";
}

<h2>Asignar Personal Sucursal</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("AsignarpersonalSucursal", "Usuario", FormMethod.Post, new { @class = "form" }))
{
    @Html.ValidationSummary(false)
    <fieldset>
        <div class = "widget" >
            <div class = "title"><h6>Asignar Personal</h6></div> 

            <div class="formRow">
                <label>Nombre</label>
                <div class = "formRight" ><input type = "text" id = "nombre" name = "nombre" class="validate[required,custom[onlyLetterSp]]" ,name="lettersValid", maxlength = "50", placeholder = "Maximo 50 caracteres aqui" /></div>
                <div class = "clear" ></div>
            </div>
            <div class="formRow">
                <label>DNI</label>
                <div class = "formRight" ><input type = "text" id = "cargo" name = "cargo" class="validate[required,custom[onlyLetterSp]]" ,name="lettersValid", maxlength = "50", placeholder = "Maximo 50 caracteres aqui" /></div>
                <div class = "clear" ></div>
            </div>
        </div>
    </fieldset>
    <p>
        <input type="submit" value="Buscar" class = "redB" /> |   <a href="javascript:history.back()">Regresar</a>  
    </p>
}

<p></p><p></p>

@if (ViewBag.estado != 0)
{    
    
    <label> Selecciona la Sucursal a que desee asignar</label>
    
    <div class="wrapper">
        <div class="widget">
          <div class="title"><h6>Lista de Personal</h6></div>
          <div class="dataTables_wrapper">
          
              <table cellpadding = "0" cellspacing = "0" width = "100%" class = "display dTable"> 
                <thead>
                <tr>
                    <th class="ui-state-default" rowspan="1" colspan="1" style="width:209px;" >
                        <div class="DataTables_sort_wrapper">
                        Nombre
                        <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                        </div>
                     </th>
                    <th class="ui-state-default" rowspan="1" colspan="1" style="width:209px;" >
                        <div class="DataTables_sort_wrapper">
                        DNI
                        <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                        </div>
                     </th>
                     <th class="ui-state-default" rowspan="1" colspan="1" style="width:209px;" >
                        <div class="DataTables_sort_wrapper">
                        FechaIngreso
                        <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                        </div>
                     </th>
                    <th class="ui-state-default" rowspan="1" colspan="1" style="width:209px;" >

                    </th>
                </tr>
            </thead>
                <tbody>
               @foreach (var item in Model)
                {
                    <tr class="gradeA odd">
                        <td class=" sorting_1">@Html.DisplayFor(modelItem => item.nombres)</td>
                        <td class=" sorting_1">@Html.DisplayFor(modelItem => item.nroDocumento)</td>
                        <td class=" sorting_1">@Html.DisplayFor(modelItem => item.fechaIngreso)</td>
                        <td class=" sorting_1">
                            
                            
                        </td>
                    </tr>
        
                }

            </tbody>
              
              </table>                                                                                                                                                                                               
                           
               
          </div>
        
        </div>
    </div>
    
    
}